import { PlainObject } from "@/bean/index"
import api from "@/utils/request"

export function getArticleNum(params: PlainObject) {
    return api({
        method: "GET",
        url: "api/article/getArticleNum",
        params
    })
}

export function getArticles(params: PlainObject) {
    return api({
        method: "GET",
        url: "api/article/getArticles",
        params
    })
}

export function oneArticle(params: PlainObject) {
    return api({
        method: "GET",
        url: "api/article/oneArticle",
        params
    })
}

export function saveArticle(data: PlainObject) {
    return api({
        method: "POST",
        url: "api/article/saveArticle",
        data
    })
}

export function deleteArticle(data: PlainObject) {
    return api({
        method: "POST",
        url: "api/article/deleteArticle",
        data
    })
}
